package com.czp.job.junit;




public class Test {
	//从1加到100
	public static void main(String[] args) {
//		long num = 100;
//		long start = System.currentTimeMillis();
//		System.out.println(f(num));
//		System.out.println(num*(num-1)/2+num);
//		System.out.println(System.currentTimeMillis() - start);
	}
	
	public static long f(long num){
		if(num == 1)
			return 1;
		return num + f(num - 1);
	}
}
